﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using vudu.ClasesDominio;
using vudu.Datos.SqlServer;
using vudu.Datos.Fachada;

namespace vudu.Logica.Clases
{
    public class Rol
    {
        #region Private Member Variables

        protected string _correo;
        protected string _password;
        protected SqlServerRol _miDB;

        #endregion

        #region Constantes

        private const string _dominioEst = "@est.vudu.com";
        private const string _dominioProf = "@prof.vudu.com";
        private const string _dominioEsc = "@esc.vudu.com";
        private const string _dominioUniv = "@univ.vudu.com";

        #endregion

        #region Constructors
        public Rol(string correo, string password)
        {
            _correo = correo;
            _password = password;
        }
        public Rol(string correo, string password, SqlServerRol miDB)
        {
            _correo = correo;
            _password = password;
            _miDB = miDB;
        }
        public Rol()
        {
            MiDB = new SqlServerRol();
        }

        #endregion

        #region Public Properties

        public string Correo
        {
            get { return _correo; }
            set { _correo = value; }
        }

        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }


        public SqlServerRol MiDB
        {
            get { return _miDB; }
            set { _miDB = value; }
        }

        #endregion

        #region Public Methods

        public bool VerificarCorreo(string correo)
        {
            EnlaceDatos miEnlace = new EnlaceDatos();

            return (miEnlace.validarCorreoRol(correo));
        }
        /*public abstract bool VerificarCedula(int ci);
        public abstract bool VerificarRol(int ci);
        public abstract bool VerificarCorreo(string correo);
        public abstract bool RegistrarRol(Rol rolActual, int usuario);*/




        #endregion

    }
}